package com.tboss.am.dao;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import com.tboss.am.dto.ResourceCollectorDto;
import com.tboss.global.helpers.sqlSession.SqlSessionSupport;

@Repository
public class ResourceCollectorDao extends SqlSessionSupport {
	
	@Autowired
	public ResourceCollectorDao(@Qualifier("sqlSession") SqlSession sqlSession){
		super(sqlSession);
	}

	@Override
	public String getNameSpace() {
		return "resourceCollector";
	}
	
	public List<ResourceCollectorDto> selectAll(){
		return super.queryForList("selectAll");		
	}
	
	public ResourceCollectorDto selectOne(String collectionTime){
		return super.queryForObject("selectOne", collectionTime);
	}

	public void insert(ResourceCollectorDto resourceCollectorDto){
		super.queryForObject("insert", resourceCollectorDto);
	}
	
	public void update(ResourceCollectorDto resourceCollectorDto){
		super.queryForObject("update", resourceCollectorDto);
	}
	
	public void delete(String collectionTime){
		super.queryForObject("delete", collectionTime);
	}
	
}
